package com.ourteam.system.dao;

/**
 * Template Name : DAO数据对象
 * Template Version : 1
 * Template Last Modfiy Date : Fri Aug 18 15:51:23 CST 2017
 * Auto Generate Date : 2018-07-31 15:13:23
  * Warning ! This file will be overwrite when regenerate !
  *
 */
import org.apache.commons.lang.StringUtils;


public class SysUserSetting implements java.io.Serializable {
    private long id;

    /**
     * Attribute id Be Seted Falg
     */
    private boolean idSetted = false;

    /**
    * Attribute id is Null Falg
    */
    private boolean idNull = false;
    private long userId;

    /**
     * Attribute userId Be Seted Falg
     */
    private boolean userIdSetted = false;

    /**
    * Attribute userId is Null Falg
    */
    private boolean userIdNull = false;
    private String itemName;

    /**
     * Attribute itemName Be Seted Falg
     */
    private boolean itemNameSetted = false;

    /**
    * Attribute itemName is Null Falg
    */
    private boolean itemNameNull = false;
    private String itemValue;

    /**
     * Attribute itemValue Be Seted Falg
     */
    private boolean itemValueSetted = false;

    /**
    * Attribute itemValue is Null Falg
    */
    private boolean itemValueNull = false;

    public SysUserSetting() {
        super();
    }

    /**
         * Get id
         *
         * @return long
         */
    final public long getId() {
        return id;
    }

    /**
     * Set id
     *
     * @param long
     */
    final public void setId(long id) {
        this.id = id;

        this.idSetted = true;

        this.setIdNull(false);
    }

    /**
     * Get id Has Been Setted
     *
     * @return boolean
     */
    final public boolean isIdSetted() {
        return this.idSetted;
    }

    /**
     * Set id Null
     *
     */
    final public void setIdNull() {
        this.idNull = true;
    }

    final public void setIdNull(boolean aNullFlag) {
        this.idNull = aNullFlag;
    }

    final public boolean isIdNull() {
        return this.idNull;
    }

    /**
         * Get userId
         *
         * @return long
         */
    final public long getUserId() {
        return userId;
    }

    /**
     * Set userId
     *
     * @param long
     */
    final public void setUserId(long userId) {
        this.userId = userId;

        this.userIdSetted = true;

        this.setUserIdNull(false);
    }

    /**
     * Get userId Has Been Setted
     *
     * @return boolean
     */
    final public boolean isUserIdSetted() {
        return this.userIdSetted;
    }

    /**
     * Set userId Null
     *
     */
    final public void setUserIdNull() {
        this.userIdNull = true;
    }

    final public void setUserIdNull(boolean aNullFlag) {
        this.userIdNull = aNullFlag;
    }

    final public boolean isUserIdNull() {
        return this.userIdNull;
    }

    /**
         * Get itemName
         *
         * @return String
         */
    final public String getItemName() {
        if (isItemNameNull()) {
            return null;
        } else {
            return StringUtils.trim(itemName);
        }
    }

    /**
     * Set itemName
     *
     * @param String
     */
    final public void setItemName(String itemName) {
        this.itemName = StringUtils.trim(itemName);

        this.itemNameSetted = true;

        this.setItemNameNull(this.itemName == null);
    }

    /**
     * Get itemName Has Been Setted
     *
     * @return boolean
     */
    final public boolean isItemNameSetted() {
        return this.itemNameSetted;
    }

    /**
     * Set itemName Null
     *
     */
    final public void setItemNameNull() {
        this.itemNameNull = true;
    }

    final public void setItemNameNull(boolean aNullFlag) {
        this.itemNameNull = aNullFlag;
    }

    final public boolean isItemNameNull() {
        return this.itemNameNull;
    }

    /**
         * Get itemValue
         *
         * @return String
         */
    final public String getItemValue() {
        if (isItemValueNull()) {
            return null;
        } else {
            return StringUtils.trim(itemValue);
        }
    }

    /**
     * Set itemValue
     *
     * @param String
     */
    final public void setItemValue(String itemValue) {
        this.itemValue = StringUtils.trim(itemValue);

        this.itemValueSetted = true;

        this.setItemValueNull(this.itemValue == null);
    }

    /**
     * Get itemValue Has Been Setted
     *
     * @return boolean
     */
    final public boolean isItemValueSetted() {
        return this.itemValueSetted;
    }

    /**
     * Set itemValue Null
     *
     */
    final public void setItemValueNull() {
        this.itemValueNull = true;
    }

    final public void setItemValueNull(boolean aNullFlag) {
        this.itemValueNull = aNullFlag;
    }

    final public boolean isItemValueNull() {
        return this.itemValueNull;
    }

    public int hashCode() {
        final int prime = 31;
        int result = 1;

        result = (prime * result) + (int) (getId() ^ (getId() >>> 32));

        return result;
    }

    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }

        if ((obj instanceof SysUserSetting) == false) {
            return false;
        }

        SysUserSetting other = (SysUserSetting) obj;

        if (getId() != other.getId()) {
            return false;
        }

        return true;
    }

    public String toString() {
        StringBuffer buffer = new StringBuffer();

        buffer.append("[");

        buffer.append("id=");
        buffer.append(this.id);

        buffer.append("userId=");
        buffer.append(this.userId);

        buffer.append("itemName=");
        buffer.append(this.itemName);

        buffer.append("itemValue=");
        buffer.append(this.itemValue);

        buffer.append("]");

        return buffer.toString();
    }
}
